﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace efish.Framework.Web
{
    public class WebTool
    {
        public static string BaseUrl
        {
            get
            {
                string url = HttpContext.Current.Request.ApplicationPath;
                if (url.EndsWith("/"))
                    return url;
                else
                    return url + "/";
            }
        }

        public static string FullBaseUrl
        {
            get
            {
                return HttpContext.Current.Request.Url.AbsoluteUri.Replace(
                   HttpContext.Current.Request.Url.PathAndQuery, "") + BaseUrl;
            }
        }
    }
}
